Ext.define('HIT.view.AIPrintWayWindow', {
    extend: 'Ext.window.Window',
    alias: 'widget.aiprintwaywindow',
    height: 173,
    width: 346,
    id : 'win-aiprintwaywindow',
    layout: {
        type: 'absolute'
    },
    title: Share.T('打印方式'),

    initComponent: function() {
        var me = this;
        this.title = Share.T('打印方式');
        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'form',
                    height: 140,
                    layout: {
                        type: 'absolute'
                    },
                    bodyPadding: 10,
                    //title: Share.T('所有方式'),
                    items: [
						{
				        	xtype : 'combobox',
							id:'printClientIp',
							x: 20,
							y: 25,
							width:250,
							labelWidth : 60,
							fieldLabel: Share.T('打印机IP'),
			                emptyText: Share.T('请输入打印机的IP地址'),
			                value : Ext.state.Manager.get('PrinterClientIP'),
							editable : false,
							valueField : 'value',
							displayField : 'text',
							store : new Ext.data.JsonStore({
 								proxy: { 
 									type: 'ajax', 
 									url : ctx + '/getPrinterIps',
 									params:{        	                	
 									},
 									reader: { 
 										type: 'json', 
 										totalProperty: '', 
 										root: '' 
 									}
 								}, 
 							fields:['text','value'], 
            	            autoLoad:true 
				          })
						},
//                        {
//                            xtype: 'button',
//                            x: 280,
//                            y: 25,
//                            text: Share.T('录入'),
//                            handler: function(){
//                            	Ext.getCmp('printClientIp').editable = true;
//                            	alert(Ext.getCmp('printClientIp').iseditable());
//                            }
//                        },
                        {
                            xtype: 'button',
                            id : 'deal-print-preview',
                            x: 20,
                            y: 70,
                            height: 40,
                            width: 70,
                            text: Share.T('预览打印')
                        },
                        {
                            xtype: 'button',
                            id : 'deal-print-auto',
                            x: 130,
                            y: 70,
                            height: 40,
                            width: 70,
                            text: Share.T('全自动打印')
                        },
                        {
                            xtype: 'button',
                            id : 'deal-print-semiauto',
                            x: 250,
                            y: 70,
                            height: 40,
                            width: 70,
                            text: Share.T('半自动打印')
                        }
                    ]
                }
            ]
        });

        me.callParent(arguments);
    }

});